home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / windows / lpdos.zip / LPBATCH.LPB < prev    next >
Text File  |  1992-01-10  |  3KB  |  102 lines

  1. '        Batch File demo for L/P Dos
  2. :BeginBatchDemo
  3. echo Clearing all variables (except for "%%P").
  4.  
  5. '    Here's a good example of the FOR command and one type of set
  6. '    that can be used with it.
  7. '    What the following FOR command does is execute a CLEAR command
  8. '    with each of the variable names substitued, one each pass.
  9.  
  10. for %%a (b c d e f g h i j k l m n o q r s t u v w x y z) clear %%a
  11.  
  12. '    And finally, since A was used as a substitution variable, clear it
  13.  
  14. clear a
  15. cls
  16. Echo     Batch Demo In Progress...
  17.  
  18. '    If picture variable is empty don't load pic..
  19. If ^%p^=^^ goto NoPic
  20. set s PicShow
  21. Echo     Loading a picture...
  22. picsize 2880 2880
  23. picpos 300 300
  24. spic %p|Batch Demo
  25. :NoPic
  26. pause Click OK to begin.|Batch Demo
  27. hpic
  28. norm
  29. pause Click OK to minimize the window.|Batch Demo
  30.     min
  31. pause Click OK to maximize the window.|Batch Demo
  32.     max
  33. cls
  34. Echo         The Saver command does 3 things.
  35. Echo     
  36. Echo         1.    By itself, I.E. "SAVER"
  37. Echo             It starts Saver.
  38. Echo         2.    With a question mark "?" "SAVER ?"
  39. Echo             It shows the saver time.
  40. Echo         3.    Or with a number, "SAVER 300"
  41. echo             Sets the Saver delay time.
  42. clear g
  43. yesno Start Saver Demo?|Batch Demo|set g dosaver
  44. if ^%g^=^^ goto NoSaver
  45. pause When you get tired of Saver, press a key or move your mouse.|Batch Demo
  46. saver
  47. :NoSaver
  48. cls
  49. type var1.txt
  50. pause Click OK to continue.|Batch Demo
  51. cls
  52. type var2.txt
  53. pause Click OK to Continue.|Batch Demo
  54. help
  55. Pause Click OK to close the Help window.|Batch Demo
  56. -help
  57. dir
  58. dirs
  59. Pause In the next dialog box select an App, then Click OK.|Batch Demo
  60. show
  61. pause Click OK continue.|Batch Demo
  62.  
  63. '    GRABWIN sets the input focus back to us, if we lost it..
  64.  
  65. grabwin
  66. input Enter the name of a text file to edit.|Batch Demo|%%e
  67. if ^%E^=^^ goto NoEdit
  68. edit %e
  69. pause Click OK to return to Batch Demo|Batch Demo
  70. grabwin
  71. :NoEdit
  72. cls
  73. echo         MSGBOX takes 4 parameters:
  74. echo             MessageString, a prompt.
  75. echo             Buttons, what buttons and/or icon you want.
  76. echo             Title, Dialog box caption.
  77. echo             %%Variable, what variable you want the return value in.
  78. echo         After the message box is displayed, the variable you
  79. echo         specified will contain the number of the button selected.
  80. echo     
  81. echo         Example: MSGBOX Click a button|274|Batch Demo|%%r
  82.  
  83. MsgBox Click a button to continue.|274|Batch Demo|%%r
  84. pause You chose %r.|Batch Demo
  85. cls
  86. ver
  87. if ^%s^=^PicShow^ goto EndDemo
  88. echo     
  89. echo To see the Picture commands in action:
  90. echo     
  91. echo Type:
  92. echo     SET P picturename
  93. echo     
  94. echo Where picturename=the filename of a bitmap, icon or metafile.
  95. echo Then start this batch file again.
  96. echo     
  97. clear r
  98. :EndDemo
  99. msgbox Run Batch Demo Again?|36|Batch Demo|%%r
  100. if ^%r^=^Yes^ goto BeginBatchDemo
  101. echo Batch Demo Complete..
  102.